<%@page import="edcom.server.*"%>
<%@page import="edcom.client.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%

//invoke LoginView 
LoginView view = new LoginView();
String[] errorMessages, inputs = new String[8];

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>requestLogin</title>
</head>
<body>

<h1>TESTBENCH</h1>
<h3>requestLogin()</h3>
<a href="index.jsp">RETURN</a>
<br /><br />

<p>Since this is a login request, only plausible test cases (at the moment) <br/>
is a registered username-password pair, a nonexistent username-password pair, <br/>
and empty strings.
<br/><br/>
<!-- (DevTeam, be sure to hard-set this on SQL.) -->
<br/>
<br/>
Registered Username-Password Pair &gt;&gt; result {login success}<br/>
<code>
UserName: edcenteno<br/>
PassWord: setmypassword<br/>
SQL&gt; <% view = new LoginView();
errorMessages = view.requestLogin("edcenteno", "setmypassword");
if((errorMessages[Student.sqlStatus] == "") ||
		(errorMessages[Student.sqlStatus] == null))
	out.println("{login success}");
else out.println(errorMessages[Student.sqlStatus]);
%><br/>
other errors? {<%
out.print(errorMessages[Student.generalError]);
%>}<br/>
</code>
<br/><br/>

Nonexistent Username-Password Pair &gt;&gt; result {login fail}<br/>
<code>
UserName: unregistered<br/>
PassWord: asdfpassword<br/>
SQL&gt; <% view = new LoginView();
errorMessages = view.requestLogin("unregistered", "asdfpassword");
if((errorMessages[Student.sqlStatus] == "") ||
		(errorMessages[Student.sqlStatus] == null))
	out.println("{login success}");
else out.println(errorMessages[Student.sqlStatus]);
%><br/>
other errors? {<%
out.print(errorMessages[Student.generalError]);
%>}<br/>
</code>
<br/><br/>

Empty-string Username-Password Pair &gt;&gt; result {login fail}<br/>
<code>
UserName: {empty}<br/>
PassWord: {empty}<br/>
SQL&gt; <% view = new LoginView();
errorMessages = view.requestLogin("", "");
if((errorMessages[Student.sqlStatus] == "") ||
		(errorMessages[Student.sqlStatus] == null))
	out.println("{login success}");
else out.println(errorMessages[Student.sqlStatus]);
%><br/>
other errors? {<%
out.print(errorMessages[Student.generalError]);
%>}<br/>
</code>
<br/><br/>

</body>
</html>
